// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import store from './store'
import router from './router'
import Cube from 'cube-ui'
import VueAMap from 'vue-amap'
// 时间过滤器
import moment from 'moment'
Vue.filter('datafmt', function (value) {
    return new Date(parseInt(value)).toLocaleString().replace(/年|月/g, "-").replace(/日/g, " ")
})
Vue.use(Cube)

// 野狗通讯
// Vue.use(Wilddog)

Vue.use(VueAMap)

// 初始化vue-amap
VueAMap.initAMapApiLoader({
  // 高德的key
  key: '9f3ed7f4b5999df279c582cf43f9602d',
  // 插件集合
  plugin: ['Geolocation', 'AMap.Geolocation', 'Geocoder', 'AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor', 'AMap.Driving'],
  uiVersion: '1.0'
})

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: { App },
  render: h => h(App)
})
